package ddn.dao.hibernate;


import java.sql.Timestamp;
import java.util.List;

import org.hibernate.criterion.Restrictions;

import ddn.dao.UserProfileDAO;
import ddn.dao.hibernate.generic.AbstractHibernateDAO;
import ddn.dao.hibernate.pojo.UserProfile;

/**
 * <p>Hibernate DAO layer for UserProfiles</p>
 * <p>Generated at Mon May 07 17:59:06 CEST 2012</p>
 *
 * @author Salto-db Generator v1.0.16 / EJB3 + Spring/Hibernate DAO
 * @see http://www.hibernate.org/328.html
 */
public class UserProfileHibernateDAO extends
		AbstractHibernateDAO<UserProfile, Integer> implements
		UserProfileDAO {

	/**
	 * Find UserProfile by login
	 */
	public List<UserProfile> findByLogin(String login) {
		return findByCriteria(Restrictions.eq("login", login));
	}
	
	/**
	 * Find UserProfile by passwd
	 */
	public List<UserProfile> findByPasswd(String passwd) {
		return findByCriteria(Restrictions.eq("passwd", passwd));
	}
	
	/**
	 * Find UserProfile by name
	 */
	public List<UserProfile> findByName(String name) {
		return findByCriteria(Restrictions.eq("name", name));
	}
	
	/**
	 * Find UserProfile by birthday
	 */
	public List<UserProfile> findByBirthday(Timestamp birthday) {
		return findByCriteria(Restrictions.eq("birthday", birthday));
	}
	
	/**
	 * Find UserProfile by gender
	 */
	public List<UserProfile> findByGender(String gender) {
		return findByCriteria(Restrictions.eq("gender", gender));
	}
	

}
